<html>
<head>
<%@include file="templates/header.jsp"%>
<script type="text/javascript">
    function setSubmitUserAlta(action)
    {
        flag = true;
        validateInput();
        if(flag){
            document.getElementById('submitUserABM').value=action;
            document.getElementById('altaUserForm').submit();
        }
    }

    function validateInput()
    {
        if(document.getElementById('name').value == ""){
            alert("El campo Nombre es obligatorio.");
            flag = false;
            return flag;
        }
        if(document.getElementById('login').value == ""){
            alert("El campo Login es obligatorio.");
            flag = false;
            return flag;
        }
        if(document.getElementById('password').value == ""){
            alert("El campo Password es obligatorio.");
            flag = false;
            return flag;
        }
    }
</script>
</head>
<body>
<h4>INGRESE DATOS DEL USER</h4>
<form id="altaUserForm" action="../public/ejecutarUserAction.htm">
<table>
    <tr>
        <td>Nombre: (*)</td>
        <td><input id="name" name="name" type="text" value="" /></td>
    </tr>
    <tr>
        <td>Login: (*)</td>
        <td><input id="login" name="login" type="text" value="" /></td>
    </tr>
    <tr>
        <td>Password: (*)</td>
        <td><input id="password" name="password" type="password" value="" /></td>
    </tr>
    <tr>
        <td>
        <h5>Los valores con * son obligatorios.</h5>
        </td>
    </tr>
    <tr>
        <td><input id="altaButton" type="button" value="ALTA"
            onclick="setSubmitUserAlta('alta')" /></td>
    </tr>
</table>
<input type="hidden" name="submitUserABM" id="submitUserABM" /></form>
</br>
<h3><a href="<c:url value='/public/goMenu.htm'/>">MENU PRINCIPAL</a></h3>
</body>
</html>